{% load applicationcontent_tags feincms_tags feincms_page_tags %}
<html>
<head>
    <title>{{ feincms_page.title }}</title>
</head>
<body>
    <h1>{{ feincms_page.title }}</h1>

    <div id="navigation" class="clearfix">
        {% feincms_nav feincms_page level=1 as toplevel %}
        {% for p in toplevel %}
        <a {% if p|is_equal_or_parent_of:feincms_page %}class="mark"{% endif %} href="{{ p.get_absolute_url }}">{{ p.title }}</a>
        {% endfor %}
    </div>

    <div id="main">
        <h2>Main content</h2>
        {% block content %}{% feincms_render_region feincms_page "main" request %}{% endblock %}
    </div>

    <div id="sidebar">
        <h2>Sidebar content</h2>
            {% feincms_nav feincms_page level=2 as sublevel %}
            {% for p in sublevel %}
                {% if forloop.first %}<ul>{% endif %}
                <li><a href="{{ p.get_absolute_url }}">{{ p.title }}</a></li>
                {% if forloop.last %}</ul>{% endif %}
            {% empty %}
                No subpages
            {% endfor %}

            {% block sidebar %}{% feincms_render_region feincms_page "sidebar" request %}{% endblock %}
    </div>

    <span id="something">{% get_fragment request "something" %}</span>
</body>
</html>
